import carImg from '../assets/img/car.png';
import licenseImg from '../assets/img/license.png';
export default {
  data() {
    return {};
  },
  methods: {
    /**
     * @param {string} path  当前目录现对于static文件夹的路径
     * @param {string} flag  是小图还是大图
     * @param {any} e
     */
    imgError(path, flag, e) {
      let _dir = window.location.href.indexOf('/mpgs') > -1 ? '/mpgs/frontEnd/img/' : 'static/img/';
      let $Target = $(e.target);
      // let src = path + _dir + flag + '.png';
      let src = flag == 'car' ? carImg : licenseImg;
      $Target.attr('src', src);
    }
  }
};
